package com.osgix.authorize.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.osgix.authorize.model.PrivilegeInfo;
import com.osgix.authorize.dao.PrivilegeInfoDao;
import com.osgix.authorize.service.PrivilegeInfoManager;
import com.osgix.common.orm.Page;
import com.osgix.common.orm.ibatis.EntityDao;
import com.osgix.common.service.BaseManager;
import com.osgix.common.service.AbsBaseManager;
import com.osgix.authorize.service.PrivilegeInfoManager;

import com.osgix.common.orm.ibatis.BaseIbatisDao;
import org.springframework.stereotype.Repository;

@Service("privilegeInfoManager")
@Transactional
public class PrivilegeInfoManagerImpl extends AbsBaseManager<PrivilegeInfo,Long> implements PrivilegeInfoManager{

	private PrivilegeInfoDao privilegeInfoDao;
	
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	@Resource
	public void setPrivilegeInfoDao(PrivilegeInfoDao dao) {
		this.privilegeInfoDao = dao;
	}
	
	public EntityDao getEntityDao() {
		return this.privilegeInfoDao;
	}
	
	public void savePrivilegeInfo(PrivilegeInfo privilegeInfo) {
		privilegeInfoDao.save(privilegeInfo);
	}
	
	public void updatePrivilegeInfo(PrivilegeInfo privilegeInfo) {
		privilegeInfoDao.update(privilegeInfo);
	}
	
	
}
